import { request } from '@/utils/request';
import Api from '@/core/permission/modules/sup/case-approval';

/**
 * @description 获取列表
 * @param {API.GetCaseApprovalListRequest} data
 * @returns
 */
export function caseApproveList(data: API.GetCaseApprovalListRequest) {
  return request({
    url: Api.list,
    method: 'post',
    data,
  });
}

/**
 * @description 案件审批
 * @param {API.approveCaseResultItem} data
 * @returns
 */
export function approveCase(data: API.approveCaseResultItem) {
  return request(
    {
      url: Api.case,
      method: 'put',
      data,
    },
    {
      isGetDataDirectly: false,
    },
  );
}
